﻿
@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>HospShow</title>
    <script src="~/Scripts/jquery-1.10.2.js"></script>

</head>
<body>
    <div> 
        <h1 style="text-align:center;">医院管理页面</h1>
        <input id="Button1" type="button" value="添加新的医院信息" />
        <table style="text-align:center; width:1200px; border:1px solid blue;" cellpadding="0" cellspacing="0">
            <tr style="border:1px solid blue;height:50px;">
                <td style="border:1px solid blue;">医院名称</td>
                <td style="border:1px solid blue;">医院简介</td>
                <td style="border:1px solid blue;">医院图片</td>
                <td style="border:1px solid blue;">医院电话</td>
                <td style="border:1px solid blue;">医院地址</td>
                <td style="border:1px solid blue;">编辑</td>
            </tr>
            @foreach (var item in ViewBag.Hospital)
            {
                <tr style="border:1px solid blue;">
                    <td style="border:1px solid blue;">@item.Hosp_Name</td>
                    <td style="border:1px solid blue;">@item.Hosp_Message</td>
                    <td style="border:1px solid blue;"><img src="@item.Hosp_Image" style="width:100px; height:80px;" /></td>
                    <td style="border:1px solid blue;">@item.Hosp_Phone</td>
                    <td style="border:1px solid blue;">@item.Hosp_Address</td>
                    <td style="border:1px solid blue;">
                        <input type="button" value="修改" onclick="HospUpt(@item.Hosp_ID)" />
                        <input type="button" value="删除" onclick="HospDel(@item.Hosp_ID)" />
                    </td>
                </tr>
            }
        </table>
    </div>
    <script>
        $("#Button1").click(function () {
            location.href = "/HospitalInfo/Index";
        })
        function HospUpt(id)
        {
            location.href = "/HospitalInfo/HospUpt?id=" + id;
        }
        function HospDel(id)
        {
            location.href = "/HospitalInfo/HospDel?id=" + id;
        }
    </script>
</body>
</html>
